import request from '@/utils/request'

// 查询日常记录-血脂记录列表
export function listBloodLipid(query) {
  return request({
    url: '/every/fat/list',
    method: 'get',
    params: query
  })
}

// 查询日常记录-血脂记录详细
export function getBloodLipid(id) {
  return request({
    url: '/every/fat/' + id,
    method: 'get'
  })
}

// 新增日常记录-血脂记录
export function addBloodLipid(data) {
  return request({
    url: '/every/fat',
    method: 'post',
    data: data
  })
}

// 修改日常记录-血脂记录
export function updateBloodLipid(data) {
  return request({
    url: '/every/fat',
    method: 'put',
    data: data
  })
}

// 删除日常记录-血脂记录
export function delBloodLipid(id) {
  return request({
    url: '/every/fat/' + id,
    method: 'delete'
  })
}

// 查询app日常记录-血脂记录列表（按时间）
export function appListByTimeBL(query) {
  return request({
    url: '/every/fat/app/list',
    method: 'get',
    params: query
  })
}

// 查询对比趋势
export function queryTrendListBL(query) {
  return request({
    url: '/every/fat/app/trend/list',
    method: 'get',
    params: query
  })
}

// 正常异常数量统计
export function statisticsExceBL(query) {
  return request({
    url: '/every/fat/app/statisticsExce',
    method: 'get',
    params: query
  })
}

// 查询测量类型
export function queryBloodLipidTypeList(query) {
  return request({
    url: '/every/fat/targetId',
    method: 'get',
    params: query
  })
}

// 计算当前测量数据，与上一次和10天前的数据对比
export function queryDateCompareBL(id) {
  return request({
    url: '/every/fat/dateCompare/' + id,
    method: 'get'
  })
}
